# Dojo ComboBox Widget Test

A combobox is like a text <input> field (ie, you can input any value you want), but it also has a list of suggested values that you can choose from. The drop down list is filtered by the data you have already typed in.

ComboBox #1: inlined data, autocomplete=false, default value of CA (California)

Value:

ComboBox #2: dataUrl, autocomplete=true:

Value:

ComboBox #3: initially disabled, dataUrl, autocomplete=false:

Value:

Remote mode combobox

Clicking any letter in the box below will display a select-list generated from user specified java code. Note that the same select-list is always displayed. This isn't a dojo bug; it's just because remoteComboBoxData.js (our dummy test code) isn't filtering based on the search string like it should.

Key value JSON object

Multiple combo boxes on a single line:

A combo created by createWidget

this is some text below the combo boxes. It shouldn't get pushed out of the way when search results get returned. also: adding a simple combo box to test IE bleed through problem:

### Some tests:

1. Note: This is not really a ComboBox - it is actually an AutoCompleter.
2. Type in D - dropdown shows Delaware and District of columbia. [Would be nice if it bolded the D's in the dropdown list!]
3. Type in DX - input box shows DX and no dropdown.
4. Open dropdown, click an item, it selects and closes dropdown.
5. Click triangle icon - dropdown shows. Click it again - dropdown goes.
6. Check that you can type in more than required (e.g. alaba for alabama) and it still correctly shows alabama
7. Tab into the combo works, list should not apear.
8. Tab out of the combo works - closes dropdown and goes to next control (focus should not go to the dropdown because tabindex="-1").
9. Do the dropdown and click outside of it - the dropdown disappears.
10. Javascript disabled -> fallback to old style combo?
11. Can you paste in the start of a match? [no]
12. Backspace to start - dropdown shows all all items
13. Backspace deselects last character [Borked: currently you have to backspace twice]
14. Press down key to open dropdown
15. Down and up keys select previous/next in dropdown.
16. Non-alpha keys (F12, ctrl-c, whatever) should not affect dropdown.
17. Press down arrow to highlight an item, pressing enter selects it and closes dropdown.
18. Press down arrow to highlight an item, pressing space selects it and closes dropdown.
19. Check that pressing escape undoes the previous action and closes the dropdown
20. Check that pressing escape again clears the input box.
21. In IE, mouse scroll wheel scrolls through the list. Scrolls by 1 item per click even if user has set mouse to scroll more than 1 in mouse settings. Only scrolls if text input has focus (page scrolling works as normal otherwise)
22. In IE, dropdown list does not go behind the second combo (special code to manage this).
23. Check dropdown is aligned correctly with bottom of the text input
24. Probably should try the combo in a relative div or absolute div and see where the dropdown ends up. (Strongly suspect problems in this area in IE - boo)
25. Try repeatably droppingdown and closing the dropdown. Shouldnt get hung [sometimes flicks closed just after opening due to timers, but not a biggie]
26. Check that default selection of the text makes sense. e.g. text is selected after picking an item, on tabbing in to text input etc)
27. Check that dropdown is smooth [looks uggy on second keypress in FF - hides then shows]
28. Clear the field. Type in A and then tab *very quickly* and see if the results make sense (the dropdown is on a timer - searchTimer)
29. Clear the field and enter an invalid entry and tab out e.g. Qualude. Does that make sense given the combobox setup options?
30. (Add any other tests here)